package com.prothink.threadproject.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.prothink.threadproject.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    // 根据用户名查询用户信息
    @Select("SELECT * FROM users WHERE username = #{username}")
    User selectUserByUsername(String username);
    // 模糊查询用户
    List<User> selectUsersByName(String name);
}
